package com.xu.cloud.common.idempotent;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import java.time.Duration;

/**
 * @author xuguan
 * @since 2025/3/17
 */
@Data
@ConfigurationProperties(prefix = "xu.cloud.idempotent")
public class IdempotentProperties {
    /**
     * 是否开启幂等性校验, 默认开启
     */
    private boolean enable = true;
    /**
     * 幂等性token前缀
     */
    String prefix = "xu-cloud-idempotent:";
    /**
     * 幂等性token过期时间, 默认7天
     */
    Duration expireDuration = Duration.ofDays(7);
}
